﻿using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using GAS.Common;
using GAS.Common.Constants;
using System.IO;
using System.Xml;
using GAS.Common.DataSets;
using GAS.Common.DataSets.AuditDataSetTableAdapters;
using GAS.Common.Managers;

namespace GASWebServices
{
	/// <summary>
	/// Descripción breve de GASWebService
	/// </summary>
	[WebService(Namespace = "http://gas.mastermurcia.com/")]
	[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
	[ToolboxItem(false)]
	public class GASWebService : System.Web.Services.WebService
	{
		private GASManager manager;


		public GASWebService()
		{
			manager = new GASManager();
		}

		[WebMethod]
		public string[] GetAuditOptions(string auditCode)
		{
			return manager.GetAuditOptions(auditCode);
		}

		[WebMethod]
		public void SaveAudit(AuditDataSet auditDS)
		{
			manager.SaveAudit(auditDS);
		}

		[WebMethod]
		public void SaveHostAudit(AuditDataSet auditDS, string auditCode)
		{
			manager.SaveHostAudit(auditDS, auditCode);
		}

		[WebMethod]
		public string GetLastAuditCode()
		{
			return manager.GetLastAuditCode();
		}

		[WebMethod]
		public DataSet ExecuteSql(string sqlString)
		{
			return manager.ExecuteSql(sqlString);
		}
	}
}
